<template>
  <div class="main" >
    <div class="ui top attached tabular menu usermenu" v-if="isChange">
      <nuxt-link class="item" exact="" to="/">所有用户</nuxt-link>
      <nuxt-link class="item" to="/adduser">添加用户</nuxt-link>
      <nuxt-link class="item" to="/changeuser">修改用户</nuxt-link>
    </div>
    <div class="ui top attached tabular menu usermenu" v-else>
      <nuxt-link class="item" exact="" to="/">所有用户</nuxt-link>
      <nuxt-link class="item" to="/adduser">添加用户</nuxt-link>
    </div>
    <nuxt-child />
  </div>
</template>

<script>
//import $ from "jquery";
import { mapState } from "vuex";
import { login } from "@/api/user";
export default {
  name: "WebIndex",
  middleware: "authmiddle",
  computed: {
    ...mapState(["user"]),
        isChange() {
      console.log(this.$route.name)
            return this.$route.name === 'main-changeuser'
        },
  },
  methods: {

  },
  mounted() {
  },
};
</script>

<style>
.container {
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.title {
  font-family: "Quicksand", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: block;
  font-weight: 300;
  font-size: 100px;
  color: #35495e;
  letter-spacing: 1px;
}

.subtitle {
  font-weight: 300;
  font-size: 42px;
  color: #526488;
  word-spacing: 5px;
  padding-bottom: 15px;
}

.links {
  padding-top: 15px;
}
</style>
